<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
		<style>
			
		</style>
		<script>
			
			/*
				let fn = () => 函数体

				function fn(){
	
				}
			*/

			let fn = () => 1;

			console.log(fn());

			// 1个参数
			let func = a => a;

			console.log(func(10));

			// 多个参数
			let miaov = (a,b) => a + b;
			console.log(miaov(1,2));

			// 函数体代码多
			let ketang = (a,b) => {
				if(a > 1){

				}

				return a + b;
			}
			console.log(ketang(1,2));

			// 返回对象
			let foo = () => ({a:1,b:2});

			console.log(foo());

			//给每一个数倍数为2
			let arr = [1,2,3,4];

			/*let newArr = arr.map(function (item){
				return item * 2;	
			})*/

			let newArr = arr.map(item => item*2)

			console.log(newArr);


		</script>
	</head>

	<body>
		<ul>
			<li>11</li>
		</ul>
	</body>
</html>